﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>制作试卷</title>
    <!--导入layer-->
    <script src="../jQuery/jquery-1.11.2.js"></script>
    <!--导入layer-->
    <script src="../jQuery/jquery-1.11.2.js"></script>
    <script src="../layer/layer/layer.js"></script>
    <!--导入layui-->
    <link rel="stylesheet" href="../layui/layui/css/layui.css">
    <script src="../layui/layui/layui.js" charset="utf-8"></script>

    <!--引入外部css样式-->
    <style type="text/css">
#head{
    background-color: #0C0C0C;
    border: 25px solid #0C0C0C;
    width: 100%;
    height: 20%;
}
#head a{
    padding-left: 8%;
}
#div a{
    color: white;
}
body{
    background-color: whitesmoke;
}
#questions{
    margin-left: 25%;
    margin-top: 1%;
    width: 50%;
    height: 670px;
    background-color: white;
    overflow-y:auto;
    box-shadow:0px 0px  10px 5px #aaa;
}
#div1{
    height: 100px;
}
#div2{
    height: 150px;
}
#div3{
    height: 150px;
}
#div4{
    height: 150px;
}
#div5{
    height: 70px;
}
#left{
    width: 250px;
    height: 520px;
    overflow-y:auto;
}
#left a{
    color: black;
}
#right{
    width: 420px;
    height: 520px;
    margin-left: 45%;
    margin-top: -110%;
    overflow-y:auto;
    background-color: whitesmoke;
}

#ndiv1{
    height: 100px;
}
#ndiv2{
    height: 150px;
}
#ndiv3{
    height: 150px;
}
#ndiv4{
    height: 150px;
}
#ndiv5{
    height: 70px;
}
	</style>
    <script type="text/javascript">
        //根据点击事件修改导入路径
        $(".a").click(function() {
            var iframe = $("#iframe");
            if ($(this).text()=="javaWeb基础测试"){
                $("#iframe").attr("src","JavaWeb.jsp");
            }
        });
    </script>
</head>
<body>
    <!--头部菜单栏右边-->
    <div id="div" style="float: right;margin-top: 1.5%;padding-right: 8%">
        <button id="see" class="layui-btn layui-btn-normal layui-icon layui-icon-light" style="text-align: center; ">预览</button>
        <button id="finish" class="layui-btn layui-btn-normal layui-icon layui-icon-ok" style="text-align: center; ">完成编辑</button>
    </div>
    <!--头部菜单栏左边-->
    <div id="head">
        <span class="ksCount" style="color:white;"><span id="showtotalscore">&nbsp;&nbsp;试卷总分：<strong id="score"></strong>分</span>&nbsp;&nbsp;|&nbsp;&nbsp;<span id="showtotalques">试卷题目数：<strong id="totalquestions"></strong></span> </span>
        <a href="javascript:void(0);" style="margin-right: 0;color: white" onclick="setTiku();return false;" class="newBtn grayBtn">
            <i class="layui-icon layui-icon-set-sm"></i><span>随机添加试题</span></a>
        <a href="javascript:void(0);" id="setExam" style="margin-right: 0;color: white" class="newBtn grayBtn" ><i class="layui-icon layui-icon-set-sm"></i><span>考试常用设置</span></a>
    </div>
    <!--编写试卷题目-->
    <div id="questions">
        <div id="div1">
            <h3>添加问卷标题及说明</h3>
        </div>
        <hr/>
        <div id="div2">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="div3">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="div4">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="div5">
            <div id="divbat" style="margin: 20px auto 0px; text-align: center; padding-bottom: 20px;">
                <button id="btn" class="layui-btn layui-btn-normal" style="text-align: center; ">批量添加题目</button>
                <button onclick="setTiku();return false;" class="layui-btn layui-btn-primary" style="margin-left: 10px;">随机添加试题</button>
                <button class="layui-btn layui-btn-primary" onclick="PDF_launch('/wjx/design/settime.aspx?activity=91436157',660,430,null,'考试常用设置');return false;" style="margin-left: 10px;">考试常用设置</button>
                <div style="clear: both;"></div>
            </div>
        </div>
    </div>
    <div id="finishQuest" style="display: none;">
        <div id="ndiv1">
            <h3>添加问卷标题及说明</h3>
        </div>
        <hr/>
        <div id="ndiv2">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="ndiv3">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="ndiv4">
            <h1>此处是题目</h1>
        </div>
        <hr/>
        <div id="ndiv5">
            <div id="ndivbat" style="margin: 20px auto 0px; text-align: center; padding-bottom: 20px;">
                <button id="send" class="layui-btn layui-btn-normal" style="text-align: center; ">发布试卷</button>
            </div>
        </div>
    </div>
        <!--标题隐藏层-->
        <div id="body" style="text-align: left; display: none;">
        <div style="padding: 10px 0 0 10px; margin: 0px; background: #fff; font-size: 14px; color: #333;">
            <table>
                <tr>
                    <td>
                        <strong style="white-space: normal">标题：</strong>
                    </td>
                    <td>
                        <input id="title" onblur="title_onblur(this);" type="text" value="请输入您的问卷的标题" style="width: 494px; margin: 12px 0;" class="wjxui-input" maxlength="100" />
                    </td>
                </tr>
                <tr>
                    <td valign="middle">
                        <strong style="white-space: normal">说明：</strong>
                    </td>
                    <td>
                        <textarea id="account" onblur="account_onblur(this);" rows="10" title="在此输入问卷说明，可以使用HTML格式插入图片或者音乐，Google地图等"></textarea>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <div style="color: Red; padding-top: 10px;">提示：问卷说明不能超过10000个字符<span id="ready" style="display: none;">，已经输入<span id="noReady"></span>字符,还可以输入<span id="spanLeftInput"></span>字符</span></div>
                    </td>
                </tr>
            </table>
        </div>
        <div style="text-align: center; margin-top: 10px;">
            <a href="javascript:;" onclick="PDF_close();return false;" class="wjxui-btn">确定</a>
        </div>
    </div>
    </div>
    <!--添加试题-->
    <div style="display: none;" id="Additional">
        <div style="margin-top: 20px">
            <form class="layui-form" id="xx" method="post" lay-filter="myForm">
                <div id="left">
                    <ul class="layui-nav layui-nav-tree" lay-filter="test" style="background: white;">
                        <li class="layui-nav-item">
                            <a  href="javascript:;" class="a">javaWeb基础测试</a>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascript:;" class="a">java基础知识</a>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascript:;" class="a">java面向对象考试</a>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascript:;" class="a">java数据库</a>
                        </li>
                        <li class="layui-nav-item">
                            <a href="javascript:;" class="a">AJAX编程</a>
                        </li>
                    </ul>
                </div>
                <iframe id="right" src="JavaWeb.jsp">

                </iframe>
                <hr/>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" style="margin-left: 30%"  id="okk"  lay-submit lay-filter="okkFilter" >确认</button>
                        <button type="reset" class="layui-btn layui-btn-warm">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        layui.use("layer",function(){
            var layer=layui.layer;
            $("#btn").click(function () {
                //打开对话框
                closeDiv=layer.open({
                    type:1,
                    title:"从题库添加",
                    offset: 'auto',
                    shade: 0.4,
                    area:["800px","750px"],
                    content:$("#Additional").html()
                });
            })
        });
    </script>
    <script type="text/javascript">
        layui.use("layer",function(){
            var layer=layui.layer;
            $("#see").click(function () {
                //打开对话框
                closeDiv=layer.open({
                    type:1,
                    title:"试卷信息",
                    offset: 'auto',
                    shade: 0.4,
                    area:["800px","750px"],
                    content:$("#questions").html()
                });
            })
        });
    </script>
    <script type="text/javascript">
        layui.use("layer",function(){
            var layer=layui.layer;
            $("#finish").click(function () {
                //打开对话框
                closeDiv=layer.open({
                    type:1,
                    title:"完成编辑",
                    offset: 'auto',
                    shade: 0.4,
                    area:["800px","750px"],
                    content:$("#finishQuest").html()
                });
            })
        });
    </script>
    <!--考试常用设置-->
    <div style="display: none;" id="set">
        <div  class="exam__setting" style="background:#fff;margin-top:50px;">
            <div class="exam__items text-left wjx__templet__beautifyInput">
                <div class="exam__section-title text-left pull-left">
                    <strong style="font-size: 28px">
                        定时开始：
                    </strong>
                </div>
                <div class="SET-con SET-word pull-left">
                    <span class="checkboxnew__sub-option" style="font-size: 28px"><input id="cbStart" type="checkbox" name="cbStart" /><label for="cbStart">考试开始时间</label></span>
                    <span id="spanStartTime" style="">
                        <input name="txtStartDate" type="text" id="txtStartDate" class="member__width-110"  style="width: 80px;"  onclick="calendar.show(this, null, event);" />
                        <select name="ddlStartHour" id="ddlStartHour" class="member__width-60">
                            <option selected="selected" value="0">0</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                            <option value="21">21</option>
                            <option value="22">22</option>
                            <option value="23">23</option>

                        </select>
                        <input name="txtStartMinute" type="text" maxlength="2" id="txtStartMinute" class="member__width-60" style="width:30px;" />分
                    </span>
                    <script type="text/javascript">
                        var cbStart = document.getElementById("cbStart");
                        var txtStartDate = document.getElementById("txtStartDate");
                        var spanStartTime = document.getElementById("spanStartTime");
                        cbStart.onclick = function () {
                            txtStartDate.disabled = this.checked ? false : true;
                            spanStartTime.style.display = this.checked ? "" : "none";
                            if (!this.checked) txtStartDate.value = "";
                        }
                        if (cbStart.checked) cbStart.onclick();
                    </script>
                </div>
            </div>
        </div>
        <div class="exam__items text-left wjx__templet__beautifyInput" style="background:#fff;margin-top:50px;">
            <div class="exam__section-title text-left pull-left">
                <strong style="margin-top: 15%;font-size: 28px">
                    定时结束：
                </strong>
            </div>
            <div class="SET-con SET-word" >
                <span class="checkboxnew__sub-option" style="font-size: 28px"><input id="cbEnd" type="checkbox" name="cbEnd" /><label for="cbEnd">考试结束时间</label></span>
                <span id="spanEndTime" style="">
                    <input name="txtDate" type="text" id="txtDate"  style="width: 80px;" title="为空表示永不结束" class="member__width-110" onclick="calendar.show(this, null, event);" />
                    <select name="ddlHour" id="ddlHour" class="member__width-60">
                    <option selected="selected" value="0">0</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                    <option value="11">11</option>
                    <option value="12">12</option>
                    <option value="13">13</option>
                    <option value="14">14</option>
                    <option value="15">15</option>
                    <option value="16">16</option>
                    <option value="17">17</option>
                    <option value="18">18</option>
                    <option value="19">19</option>
                    <option value="20">20</option>
                    <option value="21">21</option>
                    <option value="22">22</option>
                    <option value="23">23</option>

                </select>
                    <input name="txtEndMinute" type="text" maxlength="2" id="txtEndMinute" class="member__width-60" style="width:30px;" />分
                </span>&nbsp;
                <script type="text/javascript">
                    var cbEnd = document.getElementById("cbEnd");
                    var txtDate = document.getElementById("txtDate");
                    var spanEndTime = document.getElementById("spanEndTime");
                    cbEnd.onclick = function () {
                        spanEndTime.style.display = this.checked ? "" : "none";
                        txtDate.disabled = this.checked ? false : true;
                        if (!this.checked) txtDate.value = "";
                    }
                    if (cbEnd.checked) cbEnd.onclick();
                </script>
            </div>
        </div>

        <div  class="exam__items text-left wjx__templet__beautifyInput" style="background:#fff;margin-top:50px;">
            <div class="exam__section-title text-left pull-left">
                <strong style="margin-top: 25%;font-size: 28px">
                    答题时间限制：
                </strong>
            </div>
            <div class="SET-con SET-word" style="font-size: 28px">
                需要在<input name="txtMaxTime" type="text" id="txtMaxTime" disabled="disabled" style="width:60px;margin-right:0px" /><span style="color:#ff6600;font-weight:bold">秒</span>内完成答题<a href="javascript:" title="此时间是为了限制用户的实际作答时间，由于网络或者验证码等原因，在后台查看答卷的提交所用时间可能会超过此时间。" style="margin-bottom:4px;" onclick="alert(this.title);" class="icon answer-icon answer-icon--style"></a>&nbsp;<span id="spanTip"><a target="_blank" href="/register/upgradevip.aspx?upgradeReason=5" onmouseenter="layer.tips('此功能仅对企业版用户开放，请升级!', this)" onmouseout="layer.closeAll('tips');" class="icon_vip"></a></span>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        layui.use("layer",function(){
            var layer=layui.layer;
            $("#setExam").click(function () {
                //打开对话框
                closeDiv=layer.open({
                    type:1,
                    title:"考试常用设置",
                    offset: 'auto',
                    shade: 0.4,
                    area:["600px","450px"],
                    content:$("#set").html()
                });
            })
        });
    </script>
</body>
</html>